package com.linkhub.oms.admin.modules.weighing.domain.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author Jaycle
 * @version 1.0.0
 * @Description WeighingPackageInfoResponse.java
 * @createTime 2024/10/02 21:34
 */
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
public class WeighingPackageInfoResponse implements Serializable {

    @ApiModelProperty("true or false")
    private String result;

    @ApiModelProperty("详细消息")
    private String message;

    @ApiModelProperty("快手系列设备默认 ChuteNo=2 左转，1 右转")
    @JsonProperty("ChuteNo")
    private int chuteNo;

    public static WeighingPackageInfoResponse createNotExistResult() {
        WeighingPackageInfoResponse weighingPackageInfoResponse = new WeighingPackageInfoResponse();
        weighingPackageInfoResponse.setResult("false");
        weighingPackageInfoResponse.setMessage("包裹对应订单不存在");
        return weighingPackageInfoResponse;
    }

    public static WeighingPackageInfoResponse createNotDeliveredResult() {
        WeighingPackageInfoResponse weighingPackageInfoResponse = new WeighingPackageInfoResponse();
        weighingPackageInfoResponse.setResult("false");
        weighingPackageInfoResponse.setMessage("包裹对应订单非已发货状态");
        return weighingPackageInfoResponse;
    }

    public static WeighingPackageInfoResponse createProcessingResult() {
        WeighingPackageInfoResponse weighingPackageInfoResponse = new WeighingPackageInfoResponse();
        weighingPackageInfoResponse.setResult("false");
        weighingPackageInfoResponse.setMessage("系统正在处理该数据，请稍后重试...");
        return weighingPackageInfoResponse;
    }

    public static WeighingPackageInfoResponse createOneSuccessResult() {
        WeighingPackageInfoResponse weighingPackageInfoResponse = new WeighingPackageInfoResponse();
        weighingPackageInfoResponse.setResult("true");
        weighingPackageInfoResponse.setChuteNo(1);
        return weighingPackageInfoResponse;
    }

    public static WeighingPackageInfoResponse createTwoSuccessResult() {
        WeighingPackageInfoResponse weighingPackageInfoResponse = new WeighingPackageInfoResponse();
        weighingPackageInfoResponse.setResult("true");
        weighingPackageInfoResponse.setChuteNo(2);
        return weighingPackageInfoResponse;
    }

    public static WeighingPackageInfoResponse createSyncFailureResult() {
        WeighingPackageInfoResponse weighingPackageInfoResponse = new WeighingPackageInfoResponse();
        weighingPackageInfoResponse.setResult("false");
        weighingPackageInfoResponse.setMessage("同步Shopify订单数据失败，请稍后重试...");
        return weighingPackageInfoResponse;
    }
}
